package cn.tedu.micro.service.business.service.impl;

import cn.tedu.micro.service.business.service.BusinessService;
import cn.tedu.micro.service.pojo.param.OrderAddParam;
import cn.tedu.service.order.service.OrderService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class BusinessServiceIpl implements BusinessService {
    @DubboReference
    private OrderService orderService;

    @Override
    public void buy() {
        //模拟购买业务
        //创建订单对象
        OrderAddParam orderAddParam = new OrderAddParam();
        orderAddParam.setProductCode("PU100");
        orderAddParam.setUserId("UU100");
        orderAddParam.setCount(5);
        orderAddParam.setTotalMoney(500);
        orderAddParam.setOrderSn("20250418");
        orderService.addOrder(orderAddParam);
    }
}
